import { ApiProperty } from '@nestjs/swagger';
import { IsEnum } from 'class-validator';
import { SortType } from '../constants/common.constant';
import { BasicPagingReqDto } from './basic-paging.req.dto';

/** 分页请求基类 */
export class PagingReqDto extends BasicPagingReqDto {
  @ApiProperty({ description: '正序or倒序', enum: SortType })
  @IsEnum(SortType, { message: '排序参数格式不正确' })
  readonly sort_type: SortType;
}
